Signal matching signal substitution

ABSTRACT

A signal matching signal substitution system includes a tuner for selectively receiving signals in respective television channels with an input gain control for controlling the signal output level of the tuner. The system substitutes television signals in a substitute channel in lieu of normal signals in a normal channel selected by a viewer. The system has a component for determining the input signal level of currently received signals in a currently received channel and generating a current amplitude signal. A set point generator is responsive to the current amplitude signal corresponding to the normal channel most currently received for providing a set point for the output signal level. A gain control signal generator is responsive to the set point and the signal output level for generating a gain control signal maintaining the output level at the set point. The set point may be set at a predetermined fixed level when the current amplitude signal corresponding to the most current normal channel is relatively high and is set at progressively lower levels when the current amplitude signal corresponding to the most current normal channel is below a transition level. The set point at the progressively lower levels is noise limited to provide substantially equal signal to noise ratios in the signal output of the tuner in both the normal and the substitute channels upon signal substitution. The set point is gain limited to the maximum signal output achievable by the gain control for the normal channel.

This application is a continuation, of application Ser. No. 870,093filed June 3, 1986 now abandoned.

The present invention relates to television systems and moreparticularly to fast tuning subsystems for switching channels in atelevision system. Still more particularly it relates to such subsystemsin which a selected substitute television signal in a substitute channelcan be substituted indistinguishably for one or more normal televisionsignal in respective normal channels, as for market research purposes.It relates more particularly to signal substitution wherein the signalcharacteristics of substitute signals are matched to the characteristicsof the signals for which they are substituted.

BACKGROUND OF THE INVENTION

Marketing research techniques have been developed in which a substitutetelevision signal in a substitute channel, containing a commercial theeffectiveness of which is to be assessed, is substituted for a normaltelevision signal in a normal channel in homes of selected test viewersso that the effectiveness of the commercial can be evaluated. Thisallows the promoter of a service or product to assess the reaction of asmall, demographically controlled panel of test viewers before the wideairing of a commercial which may prove ineffective.

One example of such a television signal substitution system is disclosedin U.S. Pat. No. 4,404,589. As there disclosed, substitute televisionprogram signals are transmitted in at least one substitute channel alongwith signal substitution control signals. A control box or terminal ateach test viewer receiver responds to the signal substitution controlsignals by selectively switching to a substitute television program froma normal program. The signal substitution control signals include anumber of different terminal command signals and a number of differentevent command signals. Each of the terminal command signals includes arespective test viewer address signal for identifying a respective testviewer receiver and a number of event identification signals identifyingrespective signal substitution events in which this terminal is toparticipate. Each of the event command signals includes a respectiveevent address signal corresponding to a respective event, an appropriatesubstitution control command, a substitute channel identificationsignal, and one or more normal channel identification signals foridentifying the normal channels from which the receiver is to beswitched. The current event command signals corresponding to eachallowable event address are stored in the terminal for later correlationwith the terminal's participation event list and to the viewer'sselected channel signal. When the viewer selected channel corresponds toa normal channel identification signal associated with a current eventcommand whose event address signal corresponds to an event in which therespective terminal is to participate, the substitute channel issubstituted for the channel selected by the viewer for a perioddetermined by the event command signals. Subsequent responses to theevents, such as purchases of the respective viewers, are thenindividually tabulated and analyzed against the responses of viewersreceiving the normal signals.

When a viewer changes channels on a modern television receiver, thechannel change is carried out in, for example, about a quarter of asecond. The change is accompanied by momentary disruption of the pictureand a sound pop or a period of sound muting. When a market researchcompany causes a channel substitution, it is desirable that thesubstitution be carried out so quickly and unobtrusively as to beimperceptible to the normal test viewer. If the substitution weredistinguishable, it could, at least subconsciously, influence theresponse of the test viewer to the commercial. That is, were the viewerto know or suspect he was receiving a test commercial, he might react ina manner in which he believes he is expected to react, rather thanacting normally, skewing the test results from his normal response.Therefore, it is desirable that the tuning be accomplished extremelyrapidly so as to be indistinguishable. More specifically, the transitiontime between channels should be kept within about 60 microseconds toprevent an audible pop due to loss of the television signal intercarrierfrequency modulated with the sound subcarrier. The normal and substitutechannel tuning should be very accurately matched to ensure no shift inpicture quality, particularly that of the chroma signal. The transitionshould be timed to occur during the vertical blanking interval betweenpicture fields so that the change is not seen by the viewer.

Switching channels may require a large frequency change in the tuner.For example, if the normal channel is a low VHF channel (wherein Channel2 has a picture carrier frequency of 55.25 MHz) and the substitutechannel is a high UHF channel (wherein Channel 70 has a video carrierfrequency of 807.25 MHz), the tuner might have to slew through more than700 MHz. The vertical blanking interval of standard NTSC video, duringwhich the substitution is to be effected, takes 1.3 milliseconds. Thefactor that is most critical in making the substitutionindistinguishable is the sound. The audio stage of the televisionreceiver is not tuned to the sound carrier, but is tuned to the 4.5 MHzintercarrier beat frequency generated between the video carrier and thesound carrier in each VHF and UHF channel. When the tuner of thereceiver tunes between channels the intercarrier beat frequencydisappears because both the video and sound carriers are no longersimultaneously present in the IF pass band. When the audio stage of thetelevision receiver has no signal applied, its internal limiteramplifier will amplify noise up to an audible amplitude level. Thiscauses the pop heard during viewer controlled channel changing. Thispresents no problem when the viewer changes channels, for it is to beexpected. However, if an audible pop were produced during signalsubstitution, it would alert the viewer to the fact of substitution.

In order to avoid the effect of noise during signal substitution, thechannel change must be sufficiently fast that the human ear cannotdistinguish it. The total energy of the noise burst is the integral ofpower over time, but the human ear is essentially logarithmic inperception and can hear extremely low energy noise pulses. To make thenoise attendant a channel change unobtrusive, the change should beaccomplished in less than about 60 microseconds. Not only is extremelyfast tuning required, but also the tuning must be relatively accurate torecover the 4.5 MHz intercarrier beat frequency. Due to the closeproximity of the sound carrier of an adjacent channel to the videocarrier of a substitute channel, a maximum error of about ±500 KHz isrequired for both the picture and sound subcarriers of the substitutechannel to be within the pass band.

Previous signal substitution systems have employed a cable televisiondistribution system with a control box for channel switching located ateach test viewer's home. These systems have employed a fast electronictuner having a voltage controlled oscillator whose output frequencydetermined the channel to which the tuner was tuned. A voltage dividernetwork established predicted tuning voltages necessary to cause thelocal oscillator to translate each individual channel's frequency tothat of at least one channel of the television receiver. The tuner wasmade to select a particular channel very quickly by jamming theappropriate control voltage into the local oscillator, causing it toslew rapidly to the new frequency. This is known as jam tuning. Thus, bydirecting an electronic switch in the local oscillator control circuitto change from a normal channel voltage to the substitute channelvoltage, a rapid substitution could be made. This prior art tunercontroller system was predictive in nature in that the channel tuningcontrol voltages corresponding to the desired input channels weredetermined by testing prior to or during installation of the control boxat the home of the test viewer. A problem encountered was that with timethe correct tuning voltages tended to drift.

Drifting resulted in frequency errors which caused loss of picturedefinition, and color hue and saturation changes. The automatic finetuning circuitry in the television set of the test viewer might correctthe error, but it would correct the error in a visible manner due to itsslow operating speed. With time, the drifting became so extreme as torequire that the control boxes be removed from test viewer homes forrecalibration.

To extend the useful life of the control boxes without returning them tothe shop for recalibration, a station-keeping feedback loop was added tothe jam slewing. The electronic tuner assemblies for cable televisionsignal substitution systems then employed a phase-locked loop feedbacksystem which sampled the frequency output of the local oscillator in thetuner to determine if a frequency error were present. If such an errorwere present, the phase detector would provide an error signal forcombination with the predicted voltage signal and application of aresultant voltage signal to the local oscillator of the tuner, therebycausing the tuner to provide the desired frequency output even afterdrifts such as caused by the aging of components. However, with time,due to aging of the components, the control values predicted for thevarious frequencies became more and more erroneous. This resulted in thevoltage applied during the feed forward phase becoming so incorrect forthe particular channel desired that the relatively slow operatingphase-locked loop operated such that the viewer could perceive thesubstitution. Indeed, the initial voltage applied could become soerroneous as not to be able to tune to the proper channel. When thetuning became so impaired, the control box had to be returned to theshop for recalibration. Further, this type of control did not compensatefor frequency errors in the received signals. Such errors are caused bytransmission or conversion errors in the system ahead of the receiver.

Amplitude variation between the normal channel and the substitutechannel also can make unobtrusive channel substitution difficult. Theviewer can discern the substitution by a change in the visual quality ofthe picture. If the signal level changes too much, the television mayfail to detect the synchronizing pulses and hence may fail to identify avideo signal. The prior systems have taken no account of those problems.

BRIEF SUMMARY OF THE INVENTION

The present invention is directed to signal matching in a signalsubstitution system wherein substitute signals in a substitute channelare substituted at a viewer's television receiver in lieu of normalsignals in a normal channel selected by the viewer. In order that thesubstitution be unobtrusive, certain characteristics of the substitutesignals are matched to the corresponding characteristics of the signalsfor which they are substituted.

There is no need for signal matching when the viewer switches betweenchannels. It is only when there is to be a substitution that matching isneeded to make an unobtrusive substitution. This matching problemincludes switching back to the normal channel after the substitutemessage (commercial) is completed. Because the substitution systemimplies control of the quality of the transmitted substitute signal, itmay in every case be safely assumed that the received signals in thesubstitute channel are the stronger or are at least strong enough thatthe desired signal level is the level normally optimal.

The input signal levels for the respective normal and substitutechannels are determined. An amplitude signal corresponding to the mostcurrently received normal channel is used to control the output signallevel at an appropriate set point both for the normal signals and thesubstitute signals in order to match the amplitudes. The set point isset so as to provide a nominally optimal output signal level for thenormal channel when the input level is relatively high. Should thesignal level control be unable to attain such optimal signal level, theset point is gain limited to the attainable level. Should the inputsignal level for the normal channel be so low as to result in a poorpicture, the set point is set to degrade the signal to noise ratio forthe substitute signals to produce an equally poor picture. This isachieved by an input gain control for reducing the output signal levelso that a greater portion of the output signal is noise generated in thetuner when the substitute signal is received.

Accordingly, it is one aspect of the present invention to provide amatching signal substitution system wherein substitute signals in asubstitute channel are substituted at a viewer's television receiver inlieu of normal signals in a normal channel while matchingcharacteristics of the signals. The system comprises a tuner forselectively receiving signals in respective television channels, aninput gain control responsive to a gain control signal for controllingthe signal output level of the tuner, means for determining the inputsignal level of currently received signals in a currently receivedchannel and generating a current amplitude signal indicative of suchinput signal level, set point means responsive to the current amplitudesignal corresponding to the normal channel most currently received forproviding a setpoint for the output signal level, and means responsiveto the set point and the signal output level for generating a gaincontrol signal maintaining the output level at the set point.

In another aspect, the set point means provides the set point as asubstantially monotonic function of the current amplitude signalcorresponding to the most current normal channel. In a further aspect,the monotonic function has a positive slope at low amplitude.

In another aspect, the set point is where the signal to noise levels ofthe normal and substitute signals upon signal substitution aresubstantially equal in the signal output of the tuner means.

In a further aspect, the set point is set at a predetermined fixed levelwhen the current amplitude signal corresponding to the most currentnormal channel is relatively high and is set at progressively lowerlevels when the current amplitude signal corresponding to the mostcurrent normal channel is below a transition level. The set point at theprogressively lower levels is noise limited to provide substantiallyequal signal to noise ratios in the signal output of the tuner means inboth the normal and the substitute channels upon signal substitution.The set point is gain limited to the maximum signal output achievable bythe gain control for the normal channel.

Various other advantages, objects and aspects of the invention willbecome apparent from the following detailed description, particularlywhen taken in connection with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a fast tuning subsystem for the fast tuningof a television receiver for signal substitution according to thepresent invention utilizing two fast tuning tuners for respective normaland substitution channels;

FIG. 2 is a block diagram of the fast tuning tuner and up convertercomprising the frequency converters of the subsystem shown in FIG. 1;

FIG. 3 is a block diagram of a fast tuning subsystem similar to that ofFIG. 1 wherein a single fast tuning tuner is used when substitute andnormal channels are received on the same antenna;

FIG. 4 is a block diagram of a fast tuning subsystem similar to that ofFIG. 3 wherein a single fast tuning tuner is used when substitute andnormal channels are received in different frequency bands;

FIG. 5 is a block diagram of a fast tuning subsystem similar to that ofFIG. 3 wherein a single fast tuning tuner is used when substitute andnormal channels are received by cable;

FIG. 6 is a more detailed block diagram of the frequency control loopfor the fast tuning subsystems shown in FIGS. 1, 3, 4 and 5;

FIG. 7 is a more detailed block diagram of the amplitude control loopfor the fast tuning subsystem shown in FIGS. 1, 3, 4, and 5;

FIG. 8 shows the video signals in respective channels where amplitudemismatch creates a sync separation problem solved by the presentinvention;

FIG. 9 is a block diagram of one embodiment of the picture carrieranalyzer used in the control loops of FIGS. 6 and 7;

FIG. 10 is a block diagram of an alternative embodiment of the picturecarrier analyzer used in the control loops of FIGS. 6 and 7;

FIG. 11 comprises sets of curves illustrating the dynamic response ofthe picture carrier analyzers shown in FIGS. 9 and 10;

FIG. 12 is a more detailed block diagram of the interface between thechannel table and the digital frequency control loop shown in FIG. 6;

FIGS. 13A to 13C comprise curves illustrating the bases for amplitudecontrol in signal matching for substituting substitute signals into anormal channel of a viewer's receiver utilizing the amplitude controlloop shown in FIG. 7;

FIG. 14 is a block diagram of the implementation of the control loopsshown in FIGS. 6 and 7;

FIG. 15 is a flow chart diagram implementing the control loop filter andintegrator shown in FIG. 14;

FIG. 16 is a flow diagram illustrating the sequencing of the frequencycontrol loop by the control sequencer shown in FIG. 6; and

FIG. 17 is a flow diagram illustrating the sequencing of the amplitudecontrol loop by the control sequencer shown in FIG. 7.

Corresponding reference characters indicate corresponding componentsthroughout the several figures.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

As shown in FIG. 1, a control box 20 is used in a television system forswitching between substitute channels and normal channels. The controlbox 20 is located, for example, at the home of each test viewer andprovides a signal input on one of the channels selectable by thetelevision receiver 22 of the test viewer. Each box 20 is under thecontrol of a remote supervisory control facility (not shown) whichselects, for example, commercials in a substitute channel for insertioninto a selected normal channel for the purpose, of testing theeffectiveness of each commercial using an appropriately selected panelof viewers. An example of a television system with multi-event signalsubstitution is shown and discussed in the above-mentioned U.S. Pat. No.4,404,589.

As mentioned above, it is desirable that a test viewer not know when asubstitute commercial is inserted in place of a commercial of a normaltelevision channel. The judgment of the test viewer could be influenced,if only subconsciously, if the substitution were visually or aurallydistinguishable. One aspect of the present invention is the ability toswitch between channels so swiftly that the act of signal substitutionis indistinguishable by the test viewer.

The control box 20 includes one or more fast tuning tuners 24A, 24B sothat channel substitution is accomplished so quickly as to beindistinguishable to an average viewer. As shown, a tuner 24A isprovided for the substitute channels and a tuner 24B for the normalchannels. Major components of the tuners 24A, 24B are shown in FIG. 2.

Each tuner 24A, 24B receives input signals from either an antenna 30 or32 directly or a down converter 34. These input signals are inrespective channels at respective different video carrier frequencies.The input signals are preconditioned by an input gain control 42, shownas a gain controlled radio frequency (RF) amplifier 42, the gain ofwhich, either up or down, is controlled as a function of the level of adc gain control voltage input. The purpose of the gain control 42 is tocontrol signal level. This permits attenuating local signals to preventdistortion of these strong signals in subsequent stages. The gaincontrolled amplifier 42 is also useful in signal matching of theamplitude characteristics of the substitute channels to provideunobtrusive substitution, as will be discussed more fully below. Theoutput of the radio frequency amplifier 42 is applied to a mixer 44which also receives the output of a voltage controlled local oscillator46 for the purpose of providing the conventional intermediate frequency(IF) output.

The mixer 44 operates on the hetrodyne principle where the unmodulated,continuous-wave signal generated by the local oscillator 46 beats withthe received station signals to produce signals at intermediatefrequencies. The output of the mixer 44 is then amplified by anintermediate frequency amplifier 48. The IF amplifier 48 furtherincludes a channel selection filter which passes only a channel having apredetermined fixed intermediate frequency. The local oscillator 46 is avoltage controlled oscillator having a voltage control signal applied toits control input for controlling the oscillation frequency outputthereby, hence selecting the input channel converted to the fixedintermediate frequency. The intermediate frequency output of theamplifier 48 is then converted by a second converter 40 to the frequencyof a channel, for example, channel 3, to be supplied as an input to thetelevision receiver 22. The channel to be supplied is a channel normallyunused in the viewing area. The second converter 40 comprises a mixer 50and a fixed frequency local oscillator 52 operating in similar fashionto the mixer 44 and local oscillator 46, respectively.

Referring again to FIG. 1, a picture carrier analyzer (PCA) 26 isswitched between the outputs of the two tuners 24A, 24B by an electronicswitch SW1, the operation of which is controlled by a system control ormicroprocessor 28 to sample the outputs of the respective tuners. Thepicture carrier analyzer 26 provides assessments of the actual frequencyand the amplitude of each substitute and normal television channel tothe system control 28, which has a memory where the information isstored. Alternative preferred embodiments of picture carrier analyzers26 are shown in FIGS. 9 and 10, and will be described below.

As shown in FIG. 1, the control box 20 may, with an over-the-air system,receive normal channels via one or more antennas 30, 32 at the receiver22 over the VHF and/or UHF channels, respectively. These antennas 30, 32may feed the lower tuner 24B for the selection of the normal channels.If low power UHF channels are not available for commercial testingactivities, the substitute channels may be carried over the super highfrequency (SHF) band. With the use of the super high frequency band, adown converter 34 is used with an SHF antenna 36 to reduce the frequencyof the substitute channel signals as received so that they can bereadily transported to the control box 20 for substitution purposes.

The down converter 34 feeds the upper tuner 24A for the selection of thesubstitute channels. Even though the down converter 34 is normally acrystal controlled device, it is subject to frequency drift due to itshigh frequency range and the wide range of temperatures it mayexperience when located with the antenna 36, which may be outside a testviewer's home. The control system of the present invention compensatesfor this drift, as will be described below.

The control box 20 includes a data receiver 38 which separates controldata signals generated at the testing facility by the supervisorycontrol from the substitute channel signals transmitted over thesubstitute channels and feeds the data to the system control 28 forcontrolling various functions, such as channel switching operations. Thetuners 24A, 24B provide respective signals at the common intermediatefrequency (IF) input to terminals of an electronic switch SW2, theoperation of which is also controlled by the system control 28 to selectthe output of one or the other of the tuners 24A, 24B to provide theinput to the second converter 40 which converts the intermediatefrequency signals to a channel frequency to which the test viewer'stelevision receiver 22 is tuned. There are typically at least twosubstitute channels, and the tuner 24A functions to select a channelamong the appropriate substitute channels. The tuner 24B may be requiredto select a channel among normal channels, depending upon the channelselection made by the test viewer. The electronic switch SW2 operatesvery fast and is controlled to switch during the vertical blankinginterval of the television receiver 22 so as not to alert the viewer tothe fact of substitution.

The system control 28 under the control of the data from the datareceiver 38 comprises a frequency control and an amplitude control. Thesystem control selects a channel, and hence tuner 24A or 24B, inresponse to the control data and controls the tuner frequency and gainto null any error between a selected frequency and amplitude and theactual frequency and amplitude as input from the picture carrieranalyzer 26.

FIG. 3 shows an alternative preferred embodiment of a control box 20A ofthe present invention wherein low power UHF channels are available tothe commercial testing facility for use as the substitution channels.Components of the control box 20A corresponding to components of thecontrol box 20 are designated by the reference numeral assigned to thecomponent of the control box 20 with the addition of the suffix "A". Thestructure and operation of the control box 20A are similar to those ofthe control box 20 except, as the substitution channels are low powerUHF channels rather than channels in the SHF band, no down converter 34is required. A single fast tuning tuner 24AA may be used for tuning allof the normal channels and substitution channels. Electronic switchesSW1 and SW2 used in the control box 20 are thus not required in thecontrol box 20A.

Another alternative embodiment of the control box of the presentinvention is indicated by reference character 20B in FIG. 4. Componentsof the control box 20B corresponding to components of the control box 20are designated by the reference numeral assigned to the component of thecontrol box 20 with the addition of the suffix "B". The structure andoperation of the control box 20B are similar to those of the control box20 except that the down converter 34B reduces the frequencies of thesubstitute channels on the SHF band to frequencies between channels 6and 7 in the VHF band (between 88 MHz and 174 MHz). The substitutechannels are thus effectively converted to VHF channels. The output ofthe down converter 34B is combined with the signals received by the VHFantenna 30B by means of a frequency domain multiplexer 53. The output ofthe multiplexer 53 (representing the substitute VHF channels and thenormal VHF channels) is fed along with the feed from the UHF antenna 32Bto the single fast tuning tuner 24AB of the control box 20B. Again theneed for electronic switches SW1 and SW2 is eliminated in the controlbox 20B.

Yet another alternative embodiment of the control box of the presentinvention is indicated by reference character 20C in FIG. 5. Componentsof the control box 20C corresponding to components of the control box 20are designated by the reference numeral assigned to the component of thecontrol box 20 with the addition of the suffix "C". The structure andoperation of the control box 20C are similar to those of the control box20 except control box 20C is for use with a cable distribution systemcarrying the standard channels, the substitution channels and the datachannel. With this arrangement, only a single fast tuning tuner 24AC isrequired, and the need for the electronic switches SW1 and SW2 is againeliminated in the control box 20C.

Operation of the control box 20 with respect to correction of frequencyerror is best considered with reference to FIG. 6, which discloses adigital implementation of the box 20. The digital implementationincludes a system control program which controls actions by themicroprocessor 28. This implementation is preferred due to thesophistication of the system; however, an analog implementation couldalso be used. The tuner 24A, 24B therein identified represents any orall of the tuners shown in the different embodiments of FIGS. 1 to 5. Achannel selector 54 for the microprocessor 28 provides a channel selectsignal indicating the channel selected by either the test viewer or thesupervisory facility, the latter being separated from the receivedsignals by the data receiver 38. The initial or characterizing voltagefor that particular channel stored in channel table memory 56 is jammedinto a digital to analog converter (DAC) 58. (A more detailedexplanation of the jamming will be set forth below). The analog outputof the DAC 58 is applied through an analog filter 60 which is switchablebetween a wide bandwidth, fast response mode and a narrow bandwidth,slow response mode. The filter output is input to the control terminalof the local oscillator 46 of the tuner 24A, 24B.

At the time of jamming, the filter 60 is in its fast response mode. Inthe jam phase, the tuner 24A, 24B is slewed to well within 500 kHz ofthe proper frequency for the new channel by providing a sufficientlyaccurate characterizing voltage. The filter 60 remains in the wide bandwidth configuration during the next phase of control, a correction mode.By appropriate selection of constants for the control loop 63, asselected from a control table 214 by a control sequencer 62, this willtake a relatively short predetermined interval. The control sequencer 62thereafter switches the filter 60 to its narrow bandpass configurationfor a station-keeping phase of control wherein it filters out thethermal and digital feedthrough noise resulting from operation of theDAC 58.

The picture carrier analyzer 26 (the operation of which is describedlater with reference to FIG. 9) samples the IF output of the tuner 24A,24B and provides an actual frequency signal output for operation of thefeedback control loop 63. Specifically, the actual signal is applied toan analog to digital converter (ADC) 64. The digital output of the ADC64 is summed in an error signal generator 66 in the form of a summer 66with a negative digital set point input from a set point signal source68. The set point input can be used to implement a fine tuning controlfunction. The error signal output from the summer 66 is applied to afirst stage 70 of the control loop 63, the operation of which isdiscussed below. The filtered output of the first stage 70 is applied tothe second stage of the control loop 63, a digital integrator 72 formedby a unit delay Z⁻¹ circuit 74 and a summer 76. The integrator 72 addsthe error signal from the first stage 70 to the value applied throughthe Z⁻¹ circuit 74. In the second or correction phase of control, whichmay take about 100 milliseconds, the frequency is brought within about±100 kHz of the proper frequency. This permits correction of anyresidual tuning induced color and contrast error, due to frequencyerrors, to occur so quickly and accurately that it is hardly noticed, ifat all, by the viewer.

In the third or station-keeping phase of control, the time constant ofthe control loop 63 is set for 3-10 seconds to achieve a minimum noisebandwidth and consequent maximum accuracy. During this phase, a deadzone or other limit cycling suppression mechanism is enabled, so thatfine corrections in the frequency will not represent a continuingannoyance for the viewer. The purpose of the station-keeping phase ofcontrol is to compensate for aging of components and any weather induceddrift in the SHF down converter 34, if the latter be used. It maintainsany residual error below some predetermined level and at the same timeis not responsive to noise and spurious signals that would disturb thetuning, assuring a stable determination of the proper control signallevel for proper tuning. During the fourth phase of control known asadaptive estimation, the characterization voltage of the channel table56 can be updated based upon corrections made during the station-keepingphase. Thus, the next time a channel is selected, the jam phase willresult in high accuracy so that the other control phases are morequickly effective.

Operation of the control box 20 with respect to amplitude control isbest considered with reference to FIG. 7. Many of the same elements asshown in FIG. 6 for frequency control are used for amplitude control,but are differently programmed. In general, they operate in a similarmanner in both modes and need not be described separately in detail.This applies specifically to the control loop 63 comprising an erorsignal generator 86 (in lieu of the error signal generator 66), thecontrol loop first stage 70 controlled from the control table 214, andthe digital integrator 72. Considerations with respect to amplitude aresomewhat different than those regarding frequency because a slight errorin frequency causes the television to malfunction noticeably and must beaccurate within about one part in 10,000. Amplitude error on the otherhand, may require accuracy to only about 2 db to prevent loss of syncdetection.

As shown in the FIG. 8 detail of the video signal waveform, thesynchronization pulses at the crest of the waves can be detected with a1 or 2 dB tolerance in composite video amplitude. FIG. 8 shows videosignals 78 of a current channel. The video is synchronized by thehorizontal sync pulses 80 which rise above the active video and aredetected by peak detectors in the television receiver 22. If the videosignals 82 of a new channel which is switched to are of much lessamplitude, the sync pulses will not be detected, and the video will belost by the receiver 22. For amplitude control, the same sort of controlloop 63 is used. However, because the accuracy requirement is lessstringent, the station-keeping phase of the control is unnecessary foramplitude control.

In the jam mode, the initial condition from the channel table 56 isjammed into a DAC 59 functioning like the DAC 58 to apply a predictedgain control voltage to the RF amplifier 42 in the tuner 24A, 24B. Inthe correction mode, the picture carrier analyzer 26 samples the outputof the tuner 24A, 24B and provides an actual amplitude output which isconverted to a digital value by an analog to digital converter (ADC) 64.This output is adjusted in the filter function amplitude corrector 84 tocompensate for PCA filter variations with respect to frequency and thensummed by the error signal generator 86 in the form of a summer with anegative set point value (based upon various signal matching criteria asdiscussed below) and sent to the control loop first stage 70 and digitalintegrator 72. (The control table 214 for controlling the first stage 70is not separately shown in FIG. 7; it functions as explained inconnection with FIG. 6.) The amplitude error value is also combined withthe initial value for purposes of updating the channel table 56. Duringthe correction phase, the control loop 63 adjusts the input of the DAC58 based upon the actual amplitude determination of the picture carrieranalyzer 26 to bring the amplitude output of the tuner 24A, 24B closerto the desired level as determined by the set point.

Referring to FIG. 9, a block diagram of major components of a picturecarrier analyzer 26 is shown. The IF signal is applied to a narrowbandpass filter 88 which filters out all components but the picturecarrier. The separated picture carrier is fed to a limiting amplifier 90to remove all amplitude information. The limited signal is applied to afrequency discriminator 92 formed of an LC tuned circuit 94 and a phasedetector 96. The tuned circuit 94 serves as a frequency reference. Asthe picture carrier signal goes off the center frequency of the LC tunedcircuit 94, the circuit 94 introduces a phase shift, which is detectedby the subsequent phase detector 96. The detected phase difference is ameasure of the frequency error of the intermediate frequency.

The separated picture carrier signal is also applied to a logarithmicamplifier 98 (or a linear amplifier if lesser accuracy is required). Thelogarithmic amplifier 98 provides an accurate amplitude representationover a wide range of variations of input level. An envelope detector 200responds to the output of the amplifier 98 and provides a measure ofamplitude of the signal.

A signal presence detector 202 discriminates between legitimate signalsand noise or spurious signals and provides a signal presence signalindicating the presence of legitimate video signals. Such detector 202may be a video sync signal separator which provides a warning should nosynchronization pulses be detected in the amplitude output.Alternatively, such detector 202 may comprise a simple amplitudethreshold circuit for discriminating by signal level between signal andnoise, with some reduction in performance. This signal presence detector202 can serve as a loop disable to prevent updating of the jam valueinformation in the channel table based upon erroneous information. Thatis, if the sync detector does not detect the synchronization pulses, theinput signal is likely noise as opposed to a picture signal.

A variation of the picture carrier analyzer 26 for use with a cabletelevision alternative is shown in FIG. 10. This alternative itself isshown as including two alternatives, as there is an A path and a B patheach leading to a phase detector 204 as selected by a selector switch205. The A alternative depends upon the reasonable assumptions that theinput signal has very high frequency accuracy and that the major sourceof any frequency error is in the drifting of the local oscillator 46. Inthis alternative, the output of the local oscillator 46 is sampled andpasses through a preamplifier 206, the output frequency of which isdivided by m in a prescaler 208. The prescaler output frequency isdivided by N in a countdown circuit 210, where N is the integral factorto reduce the frequency down to what should be a standard frequencyproduced by a crystal reference oscillator 212. The frequencies outputby the countdown circuit 210 and the reference oscillator 212 arecompared in the phase detector 204. With the B alternative, the IFseparated picture carrier phase error is measured, much as was done withrespect to the picture carrier analyzer 26 shown in FIG. 9, with theoutput going through the limiter 90 and then to the phase detector 204for comparison against the crystal reference oscillator 212. In eithercase, the amplitude output is the result of a sample of the IF signalwhich, after filtering by the narrow bandpass filter 88, goes throughthe logarithmic or optionally linear amplifier 98 where that output issensed by the envelope detector 200 to provide the amplitude output.

Referring now to FIG. 11, the frequency and amplitude output curves fromthe picture carrier analyzer 26 are shown for various input levels,ranging from 0 dBmV to -60 dBmV. The amplitude output curves havecentral peaks while the frequency curves are somewhat "S" shaped. Thesharp peaks of the amplitude curves at the 45.75 MHz nominalintermediate carrier frequency are due to the response of input filtersin the picture carrier analyzer 26. With respect to the frequencycurves, there is a major central nesting or overlapping of curves. Thevarious frequency curves break away from the central nesting due to thefinite gain of realizable limiting amplifiers 90. Signals outside thatrange are to be ignored because they most likely represent signalcomponents of adjacent channels.

Note that any significant error from the nominal frequency induces areduction in the detected amplitude due to the responses of the picturecarrier bandpass filter 88. This error can be removed by the filterfunction amplitude corrector 84 which includes a frequency errorcompensation table stored in nonvolatile memory. In this way, amplitudeand frequency control functions can be completely separated.

FIG. 12 shows in greater detail the interface between the control loop63 and the channel table 56. The DAC 58 has 12-14 bit accuracy. Greataccuracy is needed because this DAC 58 is also in the long termstation-keeping control loop, which has a narrow frequency errortolerance. The operation of the control loop 63 is described furtherbelow. It suffices to know here that in the jam phase 16 bits of digitalinformation corresponding to the characterization voltage is passed tothe DAC 58 from the channel table 56. The DAC 58 converts this to ananalog signal for application to the switchable analog filter 60. Theswitchable filter 60 is controlled by a mode control signal from controlsequencer 62 of the microprocessor 28 (FIG. 6) to be in its wide bandconfiguration during the jam phase of operation of the control box 20 toapply the tuning voltage quickly to the control input of the localoscillator 46 in the tuner 24A, 24B. As previously described, thefrequency error signal from the picture carrier analyzer 26 is convertedto a digital value by the analog to digital converter 64. This digitalvalue is combined by the summer 66 with the set point from the set pointsignal source 68 and applied to the first stage 70. The speed ofresponse of the control loop 63 for each respective mode of controloperation is determined by the control table 214. The output of thefirst stage 70 is a one byte digital signal which is summed in thesummer 76 with the initial 16-bit characterization value by operation ofthe unit delay Z⁻¹ circuit 74 and is converted by the DAC 58 to ananalog value and applied to the switchable filter 60. The unit delay Z⁻¹circuit 74 and the summer 76 form the integrator 72, whereby repetitiveapplications of the 8 bit error signal produces a full 16-bit DAC inputsignal. During the jam mode, the switchable analog filter 60 is set forwide bandwidth to facilitate immediate slew to the new channel's tuningvoltage and rapid correction of any residual error. Following thecorrective mode, the filter is switched to its narrow band configurationto filter out the thermal and digital feed through noise generated bythe highly accurate DAC 58.

Characterization

The signals stored in the channel table 56 corresponding to respectivepredicted control voltage for the local oscillator 46 are initiallystored in the channel table in the course of manufacture. Themicroprocessor 28 includes means for adaptive predictions. This providesa fourth phase or adaptive prediction mode which functions to update theinformation in the channel table 56 each time a channel is tuned, basedupon the current observed tuning voltage at the control input of thelocal oscillator 46. This eliminates the effects of long term aging ofcomponents or environmental differences between the current environmentand the factory characterization environment. This also reduces thedemands for initial accuracy in the stored predictive signals. Anotheradvantage of such updating is that the next time the channel is selectedfor switching to, the initial or jam phase of the control box 20 willhave a high accuracy providing a more rapid settling of the control loop63. The high speed second phase, or corrective control phase, issufficiently wide band as to provide acquisition of a channel so long asit can be distinguished from a neighboring channel; that is, ±500 kHzaccuracy in the jam phase provides proper channel acquisition for thissecond phase. After the initial factory characterization, uponinstallation of the unit at a viewer's television receiver, thecorrective and station-keeping control phases may be used by theinstaller to obtain more exact jam tuning by simply sequentiallyselecting each channel. To characterize these units, a precision combgenerator signal, containing a nominal amplitude carrier at the picturecarrier frequency for each channel can be applied to the control box 20under characterization. By sweeping up stepwise from the lowest tuningfrequency (voltage), the tuning voltage for the first channel can befound upon operation of the control box 20 and the corresponding signalentered in memory in the channel table 56 for that channel. Tuningvoltages can be sequentially estimated from a channel previouslycharacterized whereby the comb generator signal tunes within theacquisition range of the corrective control loop.

The control box 20 has three types of channel table memory. A read onlymemory (ROM) is used for the channel table 56 to permanently storeprogram routines and initial tuning voltage estimates used at the startof the characterization process. A random access memory (RAM) is usedfor the channel table 56 as updated by the adaptive estimation controlphase. Finally, an electrically erasable programmable read only memory(EEPROM) is used for the channel table memory to store the results ofthe initial factory characterization and, further, the updated RAM basedchannel table 56 can be written, from time to time, into the EEPROM.

The EEPROM, for example, may be written into once a day, as uponinstruction from the supervisory facility during a quiescent period,such as in the middle of the night. One reason for this relativelyinfrequent updating is that the EEPROM can only be used for a limitednumber of write cycles. Another reason is that certain transitoryvariations in amplitude, such as flutter caused by airplanes or signalfades due to transient climatic conditions, such as thunderstorms, areto be ignored. To update the channel table in the EEPROM based upon suchtransients would actually impair its long term predictive accuracy.

Various types of information are stored in the RAM based channel table56. Upon powering up from a power failure, the RAM based table 56 isrefreshed from the EEPROM. One type of information stored is channelnomenclature. A second type of information, is tier membership whichidentifies channels the test viewer is allowed to select. For example,the test viewer is not permitted to select a substitute channel forgeneral viewing. Channels not active in the receiving area may also beidentified and precluded from selection.

A third type of information is the estimated DAC tuning voltages forfrequency slewing. This information is stored for each channel as a 16bit integer and represents the tuning voltages to be jammed into thelocal oscillator 46 for the respective channels. The estimated DACtuning voltage signals stored in the EEPROM are periodically updatedfrom the contents of the RAM based channel table 56.

A fourth type of information relates to the combined nonlinearsensitivities or gains of the picture carrier analyzer 26 and the localoscillator 46. This gain or range factor must be compensated for in thecontrol loop 63. The factor is included in the channel table 56 becausenonlinearities in the response of the local oscillator 46 can causesignificant variations in this factor between channels.

A fifth type of information in the channel table 56 is the estimatedgain control voltage which is to be jammed into the RF amplifier of thetuner 24A, 24B to get the desired signal amplitude. A signalcorresponding to the estimated gain control voltage is stored as aseight bit integer in the EEPROM for loading into the RAM upon poweringup of the control box 20. Updates of this estimated gain controlvoltage, stored in the RAM based channel table 56, based upon the outputof the amplitude control loop 63 are periodically written into theEEPROM to update it.

A sixth type of information stored in the RAM channel table 56 is theestimated amplitude of the received channel signals. This information isstored in the RAM for signal matching purposes to determine the setpoint of the amplitude control loop, as will be explained later.

Other information in the channel table 56 includes the frequency setpoint for each channel. An installer may determine that the best picturefor a particular channel is present if that channel is slightly detuned.This fine tuning set point information is stored as an 8 bit integer inthe EEPROM for loading into the RAM channel table 56 upon powering up ofthe equipment. There are at least two reasons why a channel offers abetter picture if slightly detuned. One relates to the imbalance betweenthe luminance and the picture subcarriers in that channel. A second isthe presence of potential undesirable beat interference from otherchannels. Reasons for such slight detuning are well known to those ofskill in the art and need not be further discussed here other than topoint out that the control box 20 offers this option.

Operation of the Control Box 20

One of the objectives of the present invention is to tune from a currentchannel to a selected channel so quickly that there is nodistinguishable noise or degradation of the picture. If there be someslight degradation of the picture, such as poor color or contrast, it isto be removed in the most unobtrusive manner. Another objective is tocompensate for long term variation, due to aging of components. Thepresent invention also provides for matching the characteristics of acurrent channel and the channel selected for substitution so that, apartfrom the speed of the channel change, the channels appear to haveequivalent visual quality. The signal characteristics which arecontrolled or matched include amplitude and signal to noise ratio.

Historically, frequency error for video signals has been considered amore severe problem than amplitude error or different signal to noiseratios. Frequency error causes loss of picture definition, and color canchange or disappear. The automatic frequency control circuitry in thetelevision set of the test viewer may attempt to correct the error, butit may correct the error in a very visible manner, such as by operatingrelatively slowly. Amplitude errors can also cause loss ofsynchronization or rolling of the picture. Amplitude errors can alsocause shifts in contrast which test viewers may perceive as differencesin picture definition. If the amplitude error is extreme, the automaticgain control of the television set may go into a station acquisitionmode resulting in temporary sound muting. If the signal to noise ratiosof the substitute channel and the normal channel are not matched,viewers perceive a signal with a higher signal to noise ratio asoffering the better picture.

The combination of speed and accuracy is required particularly forunobtrusive frequency control. Because the desired speed and accuracyare somewhat inconsistent requirements, they cannot be realized with asingle phase of operation. In the present invention, the controls arebroken down such that speed with reasonable accuracy is first achieved,and then the required accuracy is realized more slowly. The first phaseis the slew or jam phase in which the most recently estimated tuningvoltage for the desired channel is jammed into the voltage controlledoscillator 46, causing the tuner 24A, 24B to slew towards the desiredchannel so rapidly that there is no audible indication of the change.The rapid tuning of a channel to within this range allows the receiverto recover the 4.5 MHz intercarrier frequency of the new channel withoutnoise pop. This must occur in approximately 60 microseconds with amaximum error of approximately 500 kHz out of a potential slew range of700 MHz. The switchable analog filter 60 is set in its wide bandwidthmode to achieve these rates.

The second phase of operation is the correction phase, in which it isdesired to come within about 100 kHz of the desired frequency at a veryfast rate, well under 100 milliseconds. The correction phase beginsimmediately upon or shortly after the jamming in of the predeterminedcontrol voltage. The correction phase is based on accepting that it isnot possible to have the ultimate degree of accuracy required in theslew phase, given the wide frequency range of modern communicationsystems. However, in the correction phase, the objective is to correctany residual frequency error quickly and substantively before it canresult in a visible picture degradation, as would be the case with theslow correction rate of the station-keeping phase. The switchable analogfilter 60 is in the wide band mode during this second phase so that theeffects of residual nonlinearities and hysteresis in that filter arealso compensated by the second phase corrections.

The third phase of operation is the stationkeeping phase, which has arelatively long time constant, on the order of 3 seconds. The purposesof this phase are to achieve the best possible tuning accuracy for thefourth phase, adaptive estimation, and to correct long term tuning driftdue to aging of components or changes in the environment. It isperformed so slowly as to be unobtrusive so long as the second phase hasbrought the tuning into acceptable limits. To achieve the level ofdesired accuracy, the analog filter 60 is placed in its narrow bandwidthmode to minimize the thermal and digital feedthrough noise generated inthe DAC 58. In addition, the limit cycle or continuous cyclical huntinginherent in control loops may generate unacceptable additionalinterference components. Such limit cycling is suppressed by utilizing adead band or other equivalent limit cycle suppression technique.

The fourth control phase, adaptive estimation, provides updating of thecharacterization signals in the channel table 56 by use of long termtuning control 213. This updating phase makes use of the informationplaced in the RAM channel table 56 during the station keeping phase andpermits infrequent, perhaps once a day, updating of the characterizationtable in the EEPROM. The advantage of this is that the next time arespective channel is selected, the channel table 56 will moreaccurately reflect the actual tuning voltage required, so that thefrequency error after the slew or jam phase will be much smaller thancould be possible utilizing factory characterized values. This willminimize the corrections to be made during the second correction phaseand hence make such corrections less obtrusive.

The result of these four phases of operation is that the tuner 24A, 24Bselects the chosen channel with a minimum of visible or audibleperturbation. In addition, adaptive estimation removes the onus forexacting accuracy from the factory characterization process. Thiseliminates the need for extreme measures to achieve the ultimatecharacterization accuracy. It allows the fast corrective phasecontroller to achieve sufficient accuracy, and this looser accuracytolerance greatly increases characterization reliability. In addition,except for catastrophic faults, the adaptive estimation phase eliminatesthe need for removing the terminals from service and returning them tothe factory for recalibration, an expensive procedure. The use of theEEPROM assures that relatively accurate estimation be preserved in theevent of power failure.

There are certain instances when the EEPROM channel table is not updatedbecause the output information is suspect. This is particularly truewhen there is a question whether the output signal represents videoinformation or noise. A number of techniques can be used for detectionby the signal presence detector 202. One is the employment of the videodetector in the picture carrier analyzer 26 which looks for the syncpulses characteristic of composite sync. Another is the monitoring ofthe amplitude signal level of the television signal. If this signal hasan unexpectedly low amplitude, the frequency control loop 63 can befrozen by a defeat signal until a signal of reasonable quality is againobserved.

Another useful precaution is to limit the correction range to a ±500 kHzerror range about the frequency expected from the jam phase. Thisprevents the frequency control loop from locking onto the sound carrierof an adjacent channel upon loss of signal from the desired channel. Theadjacent channel sound carrier is only 1.5 MHz lower than the desiredchannel picture carrier and in over the air transmission may potentiallybe of level similar to that of an expected picture carrier. If such anerroneous lock were accidentally made, it would not necessarily bebroken when the desired channel reappeared, resulting in a failure ofthe frequency control loop 63. The channel table 56 in the EEPROM shouldnot be updated with such an erroneous tuning value.

With respect to amplitude, there is not such accuracy required as forfrequency control. The total amplitude range to which a televisionreceiver can respond is less than 50 dB, whereas the amplitude matchbetween the current and selected channels need only be within about twodB. The most severe amplitude degradation problem is potential loss ofsync due to amplitude mismatch between the previous and selectedchannels. See FIG. 8 for a graphic portrayal of the sync separationproblem. Note that the sync pulses are recognized by their peakamplitude being in the top 2.5 dB of the television signal. Thus anamplitude step of more than 2 dB may trigger a sync loss fault. Theautomatic gain control of the television set 22, which is principallydesigned for removing airplane flutter, very quickly and efficientlyremoves any amplitude mismatch within this range (at a speed faster thanthe corrective phase of the control box 20). Because this exceeds theperformance possible with the control box 20, the amplitude controlsequence is terminated with the corrective phase. The analog filter 60need not be switched and is left in its wideband mode.

FIG. 11 shows the dynamic response of the picture carrier analyzer 26.Note that even the slight mistuning present after the jam tuning phasewould result in amplitude output errors due to the frequency response ofthe picture carrier analyzer bandpass filter 88, FIG. 9. The filterfunction amplitude corrector 84, FIG. 7, removes these tuning relatederrors in response to the frequency error signal, completely decouplingthe frequency and amplitude control loops.

The adaptive estimation, or fourth control phase is significantly morecomplicated for amplitude control than for frequency control. As withthe frequency control, a gain control voltage estimate, for eachchannel, is kept in the channel table 56, for use in the first or jamphase. A similar long term gain control 215 is used to update the RAMbased channel table 56 gain control voltage estimate from the actualfinal value obtained upon exit of the corrective control phase of thefeedback loop 63. Also similar to the frequency control loop, resultingRAM based channel table gain control voltage and signal level setpointestimates are transferred from time to time to the nonvolatile EEPROMchannel table. However, unlike in the frequency control loop, a numberof signal transmission medium perturbations may create significant shortterm variations in these estimates. Several examples of suchperturbations are signal level flutter induced by airplane multipathsand short term reductions in signal level due to heavy precipitation.Because of these perturbations, the estimated amplitude setpoint andgain control voltage values are averaged over many samples to removeshort term variations before storing in the appropriate channel tablefield.

Like the frequency control, the amplitude control utilizes a signallevel set point value stored in the channel table 56. The over the airtelevision signal transmission medium results in a wide variation inreceived channel signal levels, potentially yielding a signal levelrange greater than the 50 dB range acceptable to television receivingequipment. A signal level estimator 226 utilizes both an observedpicture carrier analyzer signal level from the filter function amplitudecorrector 84, and an input signal level estimate obtained by dividing ina divider 228 that the observed signal level by the gain setting signalfrom the control loop 63.

FIGS. 13A through 13C illustrate the signal criteria utilized by thesignal level matching estimator. They show three aspects of theestimator 226, in each case showing signal amplitude for two channels asa function of severity of signal mismatch. That is, in going toward theright in each case, the signal 216 of greater amplitude rises and thesignal 218 of lesser amplitude decreases to show the condition ofgreater difference or mismatch. The switching under consideration hereis only for switching between a normal channel and a substitute channel.There is no need for signal matching when the viewer switches betweenchannels. The best course then is always to provide an optimal signallevel as most useful for the television receiver 22. It is only whenthere is to be a substitution that matching is needed to make anunobtrusive substitution. This matching problem includes switching backto the normal channel after the substitute message (commercial) iscompleted. Because the substitute signal is provided by the entitymaking the substitution, it may in every case be safely assumed that thesignals in the substitute channel are made the stronger or are at leaststrong enough that the desired signal level is the level normallyoptimal. If this be so, there is never any occasion to degrade thesignal in the normal channel.

FIG. 13A illustrates the case where classical automatic gain controlphilosophy can be used, namely, if observed input signal levels remainclose to an optimal signal level 219, the optimal gain control strategyis to force the signal level to a set point 220 at that optimal value byusing the tuner gain control loop 63.

The gain control of the tuner 24A, 24B has limited functionality becauseit is applied only to the RF amplifier stage 42 (FIG. 2). The RFamplifier 42 is provided normally in such mixer to control anyexcessively high signal levels before they could overload the mixerstage 44. That is, it assures a signal level to the mixer below theoverload point 222. Hence, it has much greater range as an attenuatorbut has limited capability for gain increase. FIG. 13B shows signalconditions where the mismatch between the higher and lower signal levelsexceeds the capability of the tuner gain control loop 63 to increasegain to achieve optimal signal level. The upper and lower limits of therange of signal level control of the respective signals 216 and 218 areshown at 216A and 216B and 218A and 218B, respectively. Because the gainof the signal 218 cannot be raised above the limit 218A, it is necessaryto lower the amplitude of the signal 216, i.e., the signal in thesubstitute channel, to provide a match. Because, for unobtrusive signalsubstitition, signal matching has higher priority than signal leveloptimization, a consistent signal match is chosen at the expense ofoptimum output signal level. The set point 220 is then set at the limit218A for this condition, which can be termed gain limited.

FIG. 13C illustrates the condition where the signal of lower amplitudeis so weak as to be noticeably noisy. That is, the signal to noise ratioof the resulting signal at the television set 22 is so low as to providea poor picture, e.g., being excessively snowy. It would not do tosubstitute a good picture, for this would be instantly noticed.Therefore, when the signal level of the signal 218 falls toward orbeyond a level 224 of significant noise degradation, the strategychanges to reducing the set point 220 nearer to the level of the lessersignal 218, effectively making the stronger signal noisier by reason ofthermal noise in the circuit, notably that created in the mixer 44. Thistransition is preferably done progressively because the lower the levelof the lesser signal 218, the greater the need to make the signal in thesubstitute channel more like it in respect to signal to noise ratio.

In order to implement the signal matching criteria just described, thesignal matching function is broken into two components. The firstcomponent, the signal level estimation, is performed by the signal levelestimator 226 entirely on a channel by channel basis and is based uponestimating the input signal level of each channel. The input signallevel is computed by dividing in the divider 228 a signal indicative ofoutput signal amplitude by a signal indicative of the gain of the gaincontrol 42. The latter is the gain control signal from the control loop63 applied to the tuner 24A, 24B. The former is the linearized observedsignal amplitude as sensed by the picture carrier analyzer 26, convertedto a digital signal by the ADC 64, linearized by a digital amplitudelinearizer 230 and corrected by the filter function amplitude corrector84. Both of these signals are preferably presented logarithmicallywhereby the divider 228 may be implemented by a summer. Note that on asingle channel basis, an optimal set point can be calculated based uponoptimal output level for high signal levels, maximum available tunergain for lower signal levels, and signal to noise matching criteria forvery low signal levels. A complete transfer curve of this type can beseen in FIG. 13C in the relationship between the lower amplitude channeland the selected amplitude setpoint. This optimal set point function isincorporated into the algorithm for the signal level estimator 226. (Thelinearizer 230 compensates for nonlinearity in the picture carrieranalyzer 26. A similar linearizer 234 is interposed at the input of theDAC 58 to precompensate for nonlinearities in the tuner 24A, 24B.)

The second part of the optimal amplitude control function is performedby a signal matching section 232, which is comprised of a set pointcorrector 232A and a gain voltage corrector 232B responsible formatching the current channel and the selected channel amplitudes,respectively. The three matching functions portrayed in FIGS. 13A-13Cshow that every instance of signal matching is performed by attenuatingthe stronger signal to a set point level which is controlled by thelower signal level. Thus the algorithms of the signal matching section232 provide for selecting the lower set point of the two signals inquestion as the set point for the control loop 63 for both channels, andadjusting the tuning gain control jam value of the stronger channel toeffect this reduction. Because the target application of this system issignal substitution for commercial testing, signal amplitude match needonly be maintained between the channel selected by a viewer and thesubstitute signal. In this case as stated above, it can be assumed thatthe transmission path from the substitute signal transmitter to theviewer's home has been engineered so that the substitute signal is ofhigh level. Hence, the signal level substitution will always be betweena signal of lower or comparable amplitude to a high level signal andback. Under this case, the preceding control algorithms will always bestable.

As a consequence, it is necessary to determine only the input signallevel of currently received signals in a currently received channel andgenerate a current amplitude signal indicative of such input signallevel. The signal level of the substitute signal can be assumedadequate. Then the set point for the output signal level can bedetermined from the current amplitude signal corresponding to the normalchannel most currently received. The set point and the signal outputlevel can be used to generate a gain control signal maintaining theoutput level at the set point when there is a signal substitution. Thatis, before there is a signal substitution, the current amplitude signalcontrols the signal output level of the normal channel. Then uponswitching to a substitute channel, the controlling amplitude signal isthat for the normal channel most currently received by the viewer. Thisis applicable to successive signal substitutions. It is always theamplitude signal of the last normal channel received that iscontrolling.

The set point is set as a substantially monotonic function of thecurrent amplitude signal corresponding to the most current normalchannel, wherein the monotonic function has a positive slope at lowamplitude. At low amplitude, the set point is set where the signal tonoise levels of the normal and substitute signals upon signalsubstitution are substantially equal in the signal output of the tuningmeans. The set point is set at a predetermined fixed level when thecurrent amplitude signal corresponding to the most current normalchannel is relatively high and is set at progressively lower levels whenthe current amplitude signal corresponding to the most current normalchannel is below a transition level. The set point is gain limited tothe maximum signal output achievable by the gain control means for thenormal channel.

The set point control is applied both to control the initial jammingsignal and to control the feedback for amplitude control.

Following the jam phase, a fast correction phase is always neededbecause the jammed amplitude control estimate does not reflect shortterm signal amplitude perturbations, which must, therefore, be correctedin the correction phase.

The preferred implementation of the above control functions,particularly the frequency and amplitude control loops 63, by softwarecontrolling the system control or microprocessor 28 will be explained inconnection with FIGS. 14-17. The various routines or programs shown inFIGS. 15-17 are called by a system monitor which schedules foregroundand background tasks for the television system of which the fast tuningsubsystem is a part. In general, the control loop of FIG. 15 isscheduled on an interrupt basis once every predetermined period of time,in this instance every millisecond. The frequency control sequenceroutine of FIG. 16 and the amplitude control sequence routine of FIG. 17implement the control sequencer 62. The implementation of the differentphases occurs by changing the value of the variables in the controltable 214 and executing the control loop of FIG. 15 based upon thosevariables. The calling of the control sequence routines in FIGS. 16 and17 are is the result of a trigger signal or channel change flag from thechannel selector 54. The channel selector algorithm is scheduled by thesystem monitor on a real time basis and generates the channel changeflag in response to the viewer's selecting a different normal channel orthe control data calling for a channel substitution for the normalchannel currently selected by the viewer. If the channel substitutioncommand is given, the signal matching function of the amplitude controlsequence program is enabled.

Referring now to FIG. 14 there is shown a control block diagram of thedigital control loop 63 implementing the following transfer functionG(s): ##EQU1## where Y(s)=G(s) X(s) s=Laplace variable, a and b areconstants, K=proportional gain, Y(s)=output, and X(s)=input. Thetransfer function G(s) is a well defined control function which, ifapplied to an error signal X(s) describing the difference between adesired value of a parameter and the actual value of a parameter, willgenerate an output Y(s) causing a controlled system to smoothly andrapidly come to the desired value. The control, which in Equation (1) isexpressed in the continuous frequency domains (s), is herein implementedby software in the microprocessor 28 in the discrete or digital domain(z). A digital implementation is an embodiment implemented either indigital circuitry or by software, preferably for use in themicroprocessor 28.

In an discrete implementation the pole 1/s at the origin can beimplemented as a integrator 72 comprising the summation junction 76 andthe unit delay 74. The YOUT output from this part of the discreteimplementation is the sum of the input Y2 and the previous value of theoutput YOUT, one clock period earlier.

The discrete implementation of the first stage 70 of the control loop 63of FIG. 14 is that of the transfer function: ##EQU2## The implementationis obtained by applying a bilinear transformation to transform theLaplace variable s to the discrete variable z which yields the equation:##EQU3## where c and d are obtained from a and b by prewarping theS-plane frequency axis in accordance with the bilinear transformationdefinition.

The coefficients of the variables can be grouped into three adjustabletuning constants:

    K1=(1/(1+d)) * K(1+c)

    K2=[(1/(1+d)) * K(c-1)]/K1

    K3=(1/(1+d)) * K(1-d)/K1

If in FIG. 14 the input X(z) is defined as the error signal ERR, thesecond term in Equation (3) is implemented by delaying the error signalERR in a delay unit 306 to become the previous error signal ERLASTbefore that signal is multiplied in a multiplier 310 by the coefficientK2. This signal along with the original ERR signal become addends for asummation junction 312. The last term of Equation (3) is implemented byfeeding back the output signal Y1 through a delay unit 314 to produce aprevious output signal YLAST which is then multiplied by the coefficientK3 in a multiplier 316. This signal is then added with the other two asone of the addends of the summing junction 312. The output Y1 is scaledby the coefficient K1 in a multiplier 308 and the RANGE coefficient in amultiplier 318 to produce the scaled, compensated error signal Y2. TheRANGE coefficient compensates for the effective gain of the plant whichis included in the feedback loop, i.e., the voltage controlled localoscillator 46 and the picture carrier analyzer 26. The scaled errorsignal Y2 is then coupled to the previously described discreteimplementation of the pole 1/s and input to integrator 72.

The controller pole and zero positions can be adjusted by modifying thetuning constants K1, K2 and K3. K1, K3 represent the two pole locationsof the transfer function while K2 represents the zero location of thefunction. The controller is initialized by presetting a value for thesignal YOUT and by zeroing the values for the signals ERLAST and YLASTin the control table. In addition to the basic controller for nulling anerror signal value ERR, a complete implementation as shown in FIG. 14includes a means to modify the input variable XIN. The modified inputvariable XIN is first differenced in the summing junction 66,86 with arespective set point value SPV. The difference is then scaled by acoefficient XMOD in a multiplier 302. In general XMOD takes on the valueof either zero or one to disable and enable the control loop,respectively. The error signal ERR further passes through a dead bandfunction generator 304 which can be switched into or out of the systemcontrol path. The dead band function generator, when enabled, provides aband of values for the input over which the output will remain constant.Such a dead band function is for preventing the controller from limitcycling.

The controller is implemented in software by a subroutine CONTR: whichcan be scheduled by other system programs. The subroutine CONTR: whosegeneralized flow chart is illustrated in FIG. 15 runs in an iterativefashion from values provided from a control table.

The control table is illustrated in FIG. 14 and comprises a portion ofthe working RAM of the microprocessor 28. The table is 17 bytes inlength and includes a set point value SPV as the first byte followed bythree double bytes for storing the constants K1, K2, and K3. The firstbyte of each double byte is the value of the respective tuning parameterand the second byte is the location of the binary point of the numberstored in the first byte. The next two bytes store the input value XINand its modification coefficient XMOD. A dead band flag is stored in thesubsequent byte to enable and disable this function. The following bytestores the previous value of the error signal ERLAST and is followed bythe present value of the first stage output Y1. Following these bytes isa byte which is representative of the previous value of the output ofthe first stage YLAST. The next byte contains the range variablefollowed by two bytes which are the output of the controller YOUT as adouble precision number with the high byte preceding a low byte. Thelast byte in the table is an initialize flag which indicates whether thecontrol is operating or has just been initialized.

When the subroutine CONTR: shown in FIG. 15 is called, it uses thevalues from the controller table to perform the control algorithmillustrated in FIG. 14. The program which schedules the subroutineCONTR: will either set or clear the initialize flag INIT beforetransferring control to the subroutine. The subroutine performs oneiteration of the control loop every time it is called by an interrupttimer, every 1 ms.

In block A10 when control is passed to the CONTR: subroutine, thesubroutine determines whether the initialize flag is set. If the flag isset, then this is the first pass or iteration through the control, andthe previous error signal ERLAST and the previous output of the firststage YLASTR are zeroed in blocks A11, and A12. Otherwise, the programwill execute blocks A14-A29 to implement the control function. Themicroprocessor 28 takes the input variable XIN loaded in the controllertable, subtracts the set point value SPV from it in block A14, and thenmultiplies the result by the modification variable XMOD in block A16.

The program will thereafter either bypass blocks A18-A24 or execute thesame based upon the value of the dead band flag set in the control tableby the calling routine. A bypass operation is executed when the test inblock A18 is failed, and program control is transferred to block A25. Ifthe dead band function is to be enabled, the test in block A18 is passedand the function is inserted in the control path. In general, thefunction is enabled only during the long term station keeping phase ofthe frequency control sequence.

The dead band function is implemented by first finding the sign functionSGN and absolute value function ABS of the scaled signal ERR in blocksA19 and A20, respectively. Next it is determined whether the value ofthe error signal is greater than or equal to the break point value BRKPT of the dead band function in block A21. If the value is less, thenthe error should be set to zero in block A22 to prevent limit cycling.If the value is more, then the error should be signed and have the breakpoint value BRK PT subtracted from it in block A23. The signed value ofthe error can be additionally multiplied by a slope values in block A23,but because of the previous ability of the loop to scale the error inblock A16, the actual scale factor of the preferred embodiment is one.The error value ERR as calculated in block A24 from either block A22 orblock A23 is thereafter used to further operate the control loop.

The output of the first stage Y1 is formed in block A25 by a summationof the three factors that make up the first part of the controller. Byusing the previous values ERLAST and YLAST, the delay function Z⁻¹ ofthe controller is implemented in this step. The previous variables YLASTand ERLAST are then substituted in blocks A26 and A27 with the presentvalues of the output Y1 and error signal ERR. These values are restoredinto the control table so that at the next pass through the controlprogram the present values will become the previous values.

The program then scales the output Y1 by multiplying it by the rangevariable RANGE in block A28. After proper scaling to produce a numberwhich can drive the digital to analog converter 58, the present outputYOUT is generated in block A29 as the previous output YOUT plus thepresent scaled output Y2 of the first stage. YOUT is represented to 16bit accuracy, however; all previous control variables need only berepresented to 8-bit accuracy. This completes one pass through thecontrol subroutine and the program is called reiteratively to providethe control illustrated in FIG. 14. The scheduling program which callsthe subroutine CONTR: is responsible for the timing of its call toproduce the correct time constants for the control loop 63.

The frequency control sequence and the amplitude control sequence usethis identical control implementation for each of the various phases oftheir sequences. By appropriate choices of the constants K1, K2, and K3,the various poles, zeroes, and time constants and other characteristicsrequired for each control phase or type of control can be implementedwith this single control loop. The programmability of the digitalimplementation and the ability to multiplex the same control structuresimultaneously to implement an amplitude and frequency controllerprovide a significant hardware savings.

In FIG. 16, there is shown the frequency control sequence which iscalled when the system desires to switch channels. The switching of thechannel by the channel selection routine will cause an initialization ofthe control table to those constants needed to implement frequencycontrol for that particular chosen channel. In general, the controltable receives the range variable and an initial control voltageestimate for YOUT for the frequency control sequence depending upon thechannel which is to be switched to.

Further, the set point information for the particular channel which isstored in the channel table is loaded into the control table. Thisinformation has to do with the variations from the optimal frequencycontrol values stored in the channel table. These variations could bethe result of fine tuning considerations or because of otherconsiderations relating to the local oscillator 46 in the converter 24A,24B. These considerations include compensation for drift due to theaging of components or initial miscalibration.

Once the control table is loaded with the cnannel variables, thefrequency control sequence is initiated in block A30, and the programbegins a test of whether the channel selection routine has switchedchannels. If a negative answer is produced, the subroutine terminates Ifan affirmative answer is produced, then a JAM phase in block A32 of thefrequency control sequence is initiated. The JAM phase of the frequencycontrol sequence includes setting the output value YOUT to the jamvoltage from the channel table 56 for the particular selection. Further,the initialization flag is set to produce a zeroing or initialization ofthe previous error signal and previous output of the first stage, ERLASTand YLAST, respectively. The constants K1, K2, and K3 from thecontroller table are set, and a value read from the picture carrieranalyzer (PCA) 26 is inserted for the input value XIN. The JAM phasecompletes by setting values of the subroutine CONTR: to execute, sendingthe jam voltage to the tuners 24A and 24B, and to initialize thecontroller. When the jam voltage is sent to the local oscillator 46, theanalog filter 60 is also switched into the wideband mode.

Next in block A34 the CORRECTIVE phase begins by first clearing theinitialization flag and then by setting values of the subroutine CONTR:to begin a reiterative frequency control for 100 milliseconds. Block A36provides a timer which loops after the calling of the subroutine so thatthis phase of the control is executed for the 100 millisecond timeperiod. This operation is for a short term channel frequency acquisitiontuning.

For this process, the control must correct for tuning errors as measuredby the picture carrier analyzer 26 after jamming the original controlvalue which slews the tuner to within ±500 kHz of the target frequency.The control in this configuration has an inherent 10 millisecond firstorder pole. In addition, another 2 millisecond filter delay isintroduced between the digital to analog converter 58 and the tuners 24Aand 24B. Because all other delays in the tuning system are negligible,the control is implemented as a simple proportional control with a loopgain of one. This is an effective control as long as the measurementdelay of the picture carrier analyzer 26 is compensated for.

A compensator for the control is designed to compensate for the factthat the frequency error measurement is not instantaneous. Because thepicture carrier analyzer 26 and the tuners 24A and 24B are within thecontrol loop, they are lumped together as a pole to set one of theconstants in the control table. A compensator and opposite cancellingzero are used to generate the constant K2 for the control table. If in apreferred example, the PCA pole and the DAC-tuner pole are lumpedtogether to give a single 12 millisecond pole, then in the frequencydomain this occurs in the s-plane on the s-axis at s=-83.3.

The transfer function of this pole may be represented as: ##EQU4## andthe desired compensator is a cancelling zero:

    Hz(s)=(s+83.3).

When these transfer functions are combined and transformed into thediscrete time domain with the bilinear transform, one obtains:

    Y(z)=1.2853 * X(z)-0.7147 * Z.sup.-1 X(z)-Z.sup.-1 Y(z)    (5)

From inspection of Equation (5) we can determine the controller tuningconstants:

K1=1.2853,

K2=-0.7147, and

K3=-1.0.

After this corrective phase of the control has been applied, its actionwill move the frequency to at least within 100 kHz of the desiredfrequency value. The frequency control sequence will then test whether avideo signal is present in block A38. The test generally is to determinewhether a horizontal sync signal of the video occurs within specifiedscan rate window. If there is no signal present, then the program exitsback to the scan up channel routine. However, if the signal is present,then the program enters a station keeping phase in block A40.

In block A40 the initialization value is cleared, the output value YOUTis maintained, and the set point value SPV is set to zero. Thecontroller constants are thereafter refreshed to produce a controllerwith a longer time constant for settling. The dead band flag is setduring this phase to enable the dead band function in order to eliminateobjectionable limit cycling. The analog filter 60 is also switched tothe narrow band mode. Once the initialization of the control table isaccomplished, the station keeping phase calls the control program CONTR:and begins a reiterative control for 10 seconds as timed by block A42.

The long term station keeping control function is given by the transferfunction: ##EQU5## where Kp is proportional gain, a is a constant, s isa Laplace variable, and H(s)=Y(s)/X(s). The value of Kp, the timeconstant of the television receiver, i.e., the settling time objective,and the frequency of the execution of the control loop are chosen toavoid overdriving the maximum slew rate of the television receiver orresponse to changes in timing frequency. This slew rate is defined bythe maximum step change in frequency which the television receiver cantrack without significant picture degradation. In addition, the digitalto analog converter output is limited to a deviation of ±500 kHz. fromthe characterized digital to analog converter value recorded in theEEPROM. The output limiting is disabled when no channel table definitionhas been recorded in the EEPROM.

Given a target settling time of 2 seconds and an execution period of 2seconds, the control tuning parameters are as follows:

K1=0.9914,

K2=0.9914, and

K3=0.9828.

Once the long term station-keeping phase has brought the frequency asclose as possible to the target frequency, the frequency controlsequence goes through an update phase in block A44. The preset controlvoltage stored in the working RAM space is replaced by the valuepresently applied to the DAC 58 that balances the loop. This adaptivevalue is stored in the EEPROM approximately once a day to update theoriginal channel table value which, because of aging of components andother variables, may drift.

Thereafter, in block A46 the program tests to determine whether thetelevision receiver 22 is off. If it is, the scan mode is initiated andthe program will exit to the channel selection routine. However, if thereceiver is not off or not in scan mode, the program will loop to blockA48 and the station-keeping phase, where it will continue to look forcommands to change channels or scan.

The amplitude control sequence as shown in FIG. 17 is similar to thefrequency control sequence in that it has a control sequence including aJAM phase in block A62 and a corrective phase in block A64. Theamplitude control sequence includes a test for whether channel switchingis desired in block A60 such that the amplitude needs to be controlledto a new value. If a substitute channel is being substituted, its setpoint and initial gain values are matched to those of the previouslyviewed normal channel in block A63 before proceeding to the JAM phase inblock A62. If a substitute channel is not being substituted, thesubroutine proceeds directly to the JAM phase. In the initial JAM phasein block A62, the variables K1-K3, the range variable, initializationflag, and a jam value are loaded into the control table. Further, theset point SPV having a value in accordance with the to various criteriaof the signal matching discussed with reference to FIGS. 13A-13C isloaded into the control table.

After an initial pass through the subroutine CONTR: for the JAM phase,the program passes to the corrective phase in block A64 where theinitialization flag is cleared, and the control loop is iterativelyexecuted to perform a settling based on the calculated set point for 100milliseconds. This timing is kept by a timer which is tested in blockA66. After timing out, the next block A68 tests whether a video signalis present. If no video signal is present, then the program exits to thescan up channel routine. However, if there is a video signal present,then the amplitude output to the DAC 59 is held for 10 seconds as timedby block A70.

After stabilization, the output of the amplitude control is used toupdate the amplitude value for the channel in the channel table. Insteadof just replacing the amplitude value from the last pass through theamplitude control sequence, the present value is averaged with the pastvalue by adding only a fraction of the present amplitude value to afraction of the past value. The program then sequences to block A74where the system is tested to determine whether the television receiveris turned off and whether the system is in a scan mode. In response toan affirmative answer to this test, the program will exit to the scan upchannel routine. Otherwise, if this question is answered negatively, theprogram will loop back to block A74 to repeat the test.

Although certain preferred embodiments of the invention have been setforth in some detail, various modifications may be made within the scopeof the invention. For example, the gain control 42 may be a controlledattenuator. The mode control may change the feedback to thestation-keeping mode after the control mode has brought the error belowa predetermined limit instead of after a predetermined time. The picturecarrier analyzer 26 may analyze the output signals from the tuner 24A,24B after the second converter 40 for the purposes of control.

What is claimed is:
 1. A signal matching signal substitution systemwherein substitute signals in a substitute channel are substituted at aviewer's television receiver in lieu of normal signals in a normalchannel, said system comprising receiving means for selectivelyreceiving signals in respective normal and substitute televisionchannels, input gain control means responsive to a gain control signalfor controlling the output signal level of said receiving means, meansfor switching said receiving means between said normal channel and saidsubstitue channel, means for determining the input signal level ofcurrently received signals in a currently received channel andgenerating an amplitude signal indicative of said input signal level,set point means responsive to said amplitude signal corresponding to theinput signal level for the normal channel most recently received forproviding a set point for said output signal level, and means responsiveto said set point and said output signal level for generating said gaincontrol signal maintaining said output signal level at said set point.2. A signal matching signal substitution system according to claim 1wherein said set point means provides said set point as a substantiallymonotonic function of said current amplitude signal corresponding to themost recently received normal channel.
 3. A signal matching signalsubstitution system according to claim 2 wherein said monotonic functionhas a positive slope at low amplitude.
 4. A signal matching signalsubstitution system according to claim 1 wherein said set point meansprovides said set point where the signal to noise levels of said normaland subtitute signals upon signal substitution are substantially equalin the signal output of said receiving means.
 5. A signal matchingsignal substitution system according to claim 1 wherein said set pointis set at a predetermined fixed level when said current amplitude signalcorresponding to the most current normal channel is relatively high andis set at progressive lower levels when said current amplitude signalcorresponding to the most recently received normal channel is below atransition level.
 6. A signal matching signal substitution systemaccording to claim 5 wherein said set point means includes means forgain limiting said set point to the maximum signal output achievable bysaid gain control means for the normal channel.
 7. A signal matchingsignal substituting system according to claim 5 wherein said set pointmeans includes means for noise limiting said set point at saidprogressively lower levels to provide substantially equal signal tonoise ratios in the signal output of said tuning means in both saidnormal and said substitute channels upon signal substitution.
 8. Asignal matching signal substitution system according to claim 7 whereinsaid set point means includes means for gain limiting said set point tothe maximum signal output achievable by said gain control means for thenormal channel.